using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class web_pages_ajax_list_nghiep_vu : System.Web.UI.Page
{
    public DataTable dtt_root;
    public DataTable dtt_node;
    Common comm = new Common();
    protected void Page_Load(object sender, EventArgs e)
    {
        loadHang();
        load();
    }
    protected void load() {
        string sqlComm = "select * from Danhmuc_nghiep_vu where muc = 0;";
        dtt_root = comm.getDataTable(sqlComm);
    }
    protected DataTable load(string ma_cha)
    {
        string sqlComm = "select * from Danhmuc_nghiep_vu where ma_nghiep_vu_cha = '"+ma_cha+"';";
        return  comm.getDataTable(sqlComm);
    }
    protected void loadHang()
    {
        string sqlComm = "select * from Danhmuc_hang where kich_hoat = 1;";
        dtt_node = comm.getDataTable(sqlComm);
        for (int i = 0; i < dtt_node.Rows.Count; i++)
			{
                cbb_hang.Items.Add(new ListItem(dtt_node.Rows[i]["ten_hang"].ToString(), dtt_node.Rows[i]["ma_hang"].ToString()));
			}
       
    }
}
